package tawai;

import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;

/**
 * Class holds game design<br>
 * Three layers define gamefield
 * <ol>
 * <li>LandscapeLayer - this is background and interior which do not interact with anything</li>
 * <li>ObstaclesLayer - layer holds objects which are passive but can interact with something active</li>
 * <li>TankLayoutLayer - holds information about tanks initial layout. This layer will
 * not be visible, its information will be used to place {@link Tank}s on the gamefield</li>
 * </ol>
 * <br>
 * Also, this class stores all sprites
 * 
 * @author Alex
 */
public class TawaiGameDesign {

    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
    private Image tank;
    private Image grass;
    private TiledLayer LandscapeLayer;
    private Sprite ShellExplosionSprite;
    public int ShellExplosionSpriteseq001Delay = 200;
    public int[] ShellExplosionSpriteseq001 = {0, 1, 2, 3};
    private TiledLayer ObstaclesLayer;
    private Image shell_explosion;
    private Image shell;
    private Sprite ShellSprite;
    public int ShellSpriteseq002Delay = 200;
    public int[] ShellSpriteseq002 = {0};
    private Image small_tank;
    private Sprite TankSprite;
    public int TankSpriteseq001Delay = 200;
    public int[] TankSpriteseq001 = {0, 1, 2, 3};
    private Image dead_tank;
    private Sprite DeadTank;
    public int DeadTankseq007Delay = 200;
    public int[] DeadTankseq007 = {0, 1, 2, 3};
    private Image fire;
    private Sprite RedTankSprite;
    public int RedTankseq001Delay = 200;
    public int[] RedTankseq001 = {0, 1, 2, 3};
    private Image red_small_tank;
    private Sprite TankBumper;
    public int TankBumperseq001Delay = 200;
    public int[] TankBumperseq001 = {0};
    private Image tank_bumper;
    private Sprite FireSprite;
    public int FireSpriteseq001Delay = 200;
    public int[] FireSpriteseq001 = {0, 1, 2, 3};
    private Image wall;
    private Image tanks_layout_sprites;
    private TiledLayer TankLayoutLayer;
    //</editor-fold>//GEN-END:|fields|0|

    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
    //</editor-fold>//GEN-END:|methods|0|

    public Image getTank() throws java.io.IOException {//GEN-BEGIN:|1-getter|0|1-preInit
        if (tank == null) {//GEN-END:|1-getter|0|1-preInit
            // write pre-init user code here
            tank = Image.createImage("/tank.png");//GEN-BEGIN:|1-getter|1|1-postInit
        }//GEN-END:|1-getter|1|1-postInit
        // write post-init user code here
        return this.tank;//GEN-BEGIN:|1-getter|2|
    }
//GEN-END:|1-getter|2|



    public Image getGrass() throws java.io.IOException {//GEN-BEGIN:|4-getter|0|4-preInit
        if (grass == null) {//GEN-END:|4-getter|0|4-preInit
            // write pre-init user code here
            grass = Image.createImage("/grass.png");//GEN-BEGIN:|4-getter|1|4-postInit
        }//GEN-END:|4-getter|1|4-postInit
        // write post-init user code here
        return this.grass;//GEN-BEGIN:|4-getter|2|
    }
//GEN-END:|4-getter|2|

    public TiledLayer getLandscapeLayer() throws java.io.IOException {//GEN-BEGIN:|5-getter|0|5-preInit
        if (LandscapeLayer == null) {//GEN-END:|5-getter|0|5-preInit
            // write pre-init user code here
            LandscapeLayer = new TiledLayer(13, 12, getGrass(), 30, 30);//GEN-BEGIN:|5-getter|1|5-midInit
            int[][] tiles = {
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
            };//GEN-END:|5-getter|1|5-midInit
            // write mid-init user code here
            for (int row = 0; row < 12; row++) {//GEN-BEGIN:|5-getter|2|5-postInit
                for (int col = 0; col < 13; col++) {
                    LandscapeLayer.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|5-getter|2|5-postInit
        // write post-init user code here
        return LandscapeLayer;//GEN-BEGIN:|5-getter|3|
    }
//GEN-END:|5-getter|3|

    public void updateLayerManagerForMainScene(LayerManager lm) throws java.io.IOException {//GEN-LINE:|6-updateLayerManager|0|6-preUpdate
        // write pre-update user code here
        getTankLayoutLayer().setPosition(0, 0);//GEN-BEGIN:|6-updateLayerManager|1|6-postUpdate
        getTankLayoutLayer().setVisible(true);
        lm.append(getTankLayoutLayer());
        getObstaclesLayer().setPosition(0, 0);
        getObstaclesLayer().setVisible(true);
        lm.append(getObstaclesLayer());
        getLandscapeLayer().setPosition(0, 0);
        getLandscapeLayer().setVisible(true);
        lm.append(getLandscapeLayer());//GEN-END:|6-updateLayerManager|1|6-postUpdate
        // write post-update user code here
    }//GEN-BEGIN:|6-updateLayerManager|2|
//GEN-END:|6-updateLayerManager|2|

    public Image getShell() throws java.io.IOException {//GEN-BEGIN:|24-getter|0|24-preInit
        if (shell == null) {//GEN-END:|24-getter|0|24-preInit
            // write pre-init user code here
            shell = Image.createImage("/shell.png");//GEN-BEGIN:|24-getter|1|24-postInit
        }//GEN-END:|24-getter|1|24-postInit
        // write post-init user code here
        return this.shell;//GEN-BEGIN:|24-getter|2|
    }
//GEN-END:|24-getter|2|



    public Sprite getShellSprite() throws java.io.IOException {//GEN-BEGIN:|27-getter|0|27-preInit
        if (ShellSprite == null) {//GEN-END:|27-getter|0|27-preInit
            // write pre-init user code here
            ShellSprite = new Sprite(getShell(), 2, 3);//GEN-BEGIN:|27-getter|1|27-postInit
            ShellSprite.setFrameSequence(ShellSpriteseq002);//GEN-END:|27-getter|1|27-postInit
            // write post-init user code here
        }//GEN-BEGIN:|27-getter|2|
        return ShellSprite;
    }
//GEN-END:|27-getter|2|

    public Image getSmall_tank() throws java.io.IOException {//GEN-BEGIN:|30-getter|0|30-preInit
        if (small_tank == null) {//GEN-END:|30-getter|0|30-preInit
            // write pre-init user code here
            small_tank = Image.createImage("/small_tank.png");//GEN-BEGIN:|30-getter|1|30-postInit
        }//GEN-END:|30-getter|1|30-postInit
        // write post-init user code here
        return this.small_tank;//GEN-BEGIN:|30-getter|2|
    }
//GEN-END:|30-getter|2|





    public Sprite getTankSprite() throws java.io.IOException {//GEN-BEGIN:|35-getter|0|35-preInit
        if (TankSprite == null) {//GEN-END:|35-getter|0|35-preInit
            // write pre-init user code here
            TankSprite = new Sprite(getSmall_tank(), 21, 21);//GEN-BEGIN:|35-getter|1|35-postInit
            TankSprite.setFrameSequence(TankSpriteseq001);//GEN-END:|35-getter|1|35-postInit
            // write post-init user code here
        }//GEN-BEGIN:|35-getter|2|
        return TankSprite;
    }
//GEN-END:|35-getter|2|

    public Image getDead_tank() throws java.io.IOException {//GEN-BEGIN:|37-getter|0|37-preInit
        if (dead_tank == null) {//GEN-END:|37-getter|0|37-preInit
            // write pre-init user code here
            dead_tank = Image.createImage("/dead_tank.png");//GEN-BEGIN:|37-getter|1|37-postInit
        }//GEN-END:|37-getter|1|37-postInit
        // write post-init user code here
        return this.dead_tank;//GEN-BEGIN:|37-getter|2|
    }
//GEN-END:|37-getter|2|



    public Sprite getDeadTank() throws java.io.IOException {//GEN-BEGIN:|50-getter|0|50-preInit
        if (DeadTank == null) {//GEN-END:|50-getter|0|50-preInit
            // write pre-init user code here
            DeadTank = new Sprite(getDead_tank(), 21, 21);//GEN-BEGIN:|50-getter|1|50-postInit
            DeadTank.setFrameSequence(DeadTankseq007);//GEN-END:|50-getter|1|50-postInit
            // write post-init user code here
        }//GEN-BEGIN:|50-getter|2|
        return DeadTank;
    }
//GEN-END:|50-getter|2|

    public Image getRed_small_tank() throws java.io.IOException {//GEN-BEGIN:|52-getter|0|52-preInit
        if (red_small_tank == null) {//GEN-END:|52-getter|0|52-preInit
            // write pre-init user code here
            red_small_tank = Image.createImage("/red_small_tank.png");//GEN-BEGIN:|52-getter|1|52-postInit
        }//GEN-END:|52-getter|1|52-postInit
        // write post-init user code here
        return this.red_small_tank;//GEN-BEGIN:|52-getter|2|
    }
//GEN-END:|52-getter|2|

    public Sprite getRedTankSprite() throws java.io.IOException {//GEN-BEGIN:|53-getter|0|53-preInit
        if (RedTankSprite == null) {//GEN-END:|53-getter|0|53-preInit
            // write pre-init user code here
            RedTankSprite = new Sprite(getRed_small_tank(), 21, 21);//GEN-BEGIN:|53-getter|1|53-postInit
            RedTankSprite.setFrameSequence(RedTankseq001);//GEN-END:|53-getter|1|53-postInit
            // write post-init user code here
        }//GEN-BEGIN:|53-getter|2|
        return RedTankSprite;
    }
//GEN-END:|53-getter|2|

    public Image getFire() throws java.io.IOException {//GEN-BEGIN:|55-getter|0|55-preInit
        if (fire == null) {//GEN-END:|55-getter|0|55-preInit
            // write pre-init user code here
            fire = Image.createImage("/fire.png");//GEN-BEGIN:|55-getter|1|55-postInit
        }//GEN-END:|55-getter|1|55-postInit
        // write post-init user code here
        return this.fire;//GEN-BEGIN:|55-getter|2|
    }
//GEN-END:|55-getter|2|

    public Sprite getFireSprite() throws java.io.IOException {//GEN-BEGIN:|56-getter|0|56-preInit
        if (FireSprite == null) {//GEN-END:|56-getter|0|56-preInit
            // write pre-init user code here
            FireSprite = new Sprite(getFire(), 21, 21);//GEN-BEGIN:|56-getter|1|56-postInit
            FireSprite.setFrameSequence(FireSpriteseq001);//GEN-END:|56-getter|1|56-postInit
            // write post-init user code here
        }//GEN-BEGIN:|56-getter|2|
        return FireSprite;
    }
//GEN-END:|56-getter|2|

    public Image getTank_bumper() throws java.io.IOException {//GEN-BEGIN:|58-getter|0|58-preInit
        if (tank_bumper == null) {//GEN-END:|58-getter|0|58-preInit
            // write pre-init user code here
            tank_bumper = Image.createImage("/tank_bumper.png");//GEN-BEGIN:|58-getter|1|58-postInit
        }//GEN-END:|58-getter|1|58-postInit
        // write post-init user code here
        return this.tank_bumper;//GEN-BEGIN:|58-getter|2|
    }
//GEN-END:|58-getter|2|

    public Sprite getTankBumper() throws java.io.IOException {//GEN-BEGIN:|59-getter|0|59-preInit
        if (TankBumper == null) {//GEN-END:|59-getter|0|59-preInit
            // write pre-init user code here
            TankBumper = new Sprite(getTank_bumper(), 21, 1);//GEN-BEGIN:|59-getter|1|59-postInit
            TankBumper.setFrameSequence(TankBumperseq001);//GEN-END:|59-getter|1|59-postInit
            // write post-init user code here
        }//GEN-BEGIN:|59-getter|2|
        return TankBumper;
    }
//GEN-END:|59-getter|2|

    public Image getWall() throws java.io.IOException {//GEN-BEGIN:|61-getter|0|61-preInit
        if (wall == null) {//GEN-END:|61-getter|0|61-preInit
            // write pre-init user code here
            wall = Image.createImage("/wall.png");//GEN-BEGIN:|61-getter|1|61-postInit
        }//GEN-END:|61-getter|1|61-postInit
        // write post-init user code here
        return this.wall;//GEN-BEGIN:|61-getter|2|
    }
//GEN-END:|61-getter|2|



    public Image getShell_explosion() throws java.io.IOException {//GEN-BEGIN:|75-getter|0|75-preInit
        if (shell_explosion == null) {//GEN-END:|75-getter|0|75-preInit
            // write pre-init user code here
            shell_explosion = Image.createImage("/shell_explosion.png");//GEN-BEGIN:|75-getter|1|75-postInit
        }//GEN-END:|75-getter|1|75-postInit
        // write post-init user code here
        return this.shell_explosion;//GEN-BEGIN:|75-getter|2|
    }
//GEN-END:|75-getter|2|

    public Sprite getShellExplosionSprite() throws java.io.IOException {//GEN-BEGIN:|76-getter|0|76-preInit
        if (ShellExplosionSprite == null) {//GEN-END:|76-getter|0|76-preInit
            // write pre-init user code here
            ShellExplosionSprite = new Sprite(getShell_explosion(), 10, 10);//GEN-BEGIN:|76-getter|1|76-postInit
            ShellExplosionSprite.setFrameSequence(ShellExplosionSpriteseq001);//GEN-END:|76-getter|1|76-postInit
            // write post-init user code here
        }//GEN-BEGIN:|76-getter|2|
        return ShellExplosionSprite;
    }
//GEN-END:|76-getter|2|

    public TiledLayer getObstaclesLayer() throws java.io.IOException {//GEN-BEGIN:|79-getter|0|79-preInit
        if (ObstaclesLayer == null) {//GEN-END:|79-getter|0|79-preInit
            // write pre-init user code here
            ObstaclesLayer = new TiledLayer(35, 34, getWall(), 10, 10);//GEN-BEGIN:|79-getter|1|79-midInit
            int[][] tiles = {
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
                { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
            };//GEN-END:|79-getter|1|79-midInit
            // write mid-init user code here
            for (int row = 0; row < 34; row++) {//GEN-BEGIN:|79-getter|2|79-postInit
                for (int col = 0; col < 35; col++) {
                    ObstaclesLayer.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|79-getter|2|79-postInit
        // write post-init user code here
        return ObstaclesLayer;//GEN-BEGIN:|79-getter|3|
    }
//GEN-END:|79-getter|3|

    public Image getTanks_layout_sprites() throws java.io.IOException {//GEN-BEGIN:|80-getter|0|80-preInit
        if (tanks_layout_sprites == null) {//GEN-END:|80-getter|0|80-preInit
            // write pre-init user code here
            tanks_layout_sprites = Image.createImage("/tanks_layout_sprites.png");//GEN-BEGIN:|80-getter|1|80-postInit
        }//GEN-END:|80-getter|1|80-postInit
        // write post-init user code here
        return this.tanks_layout_sprites;//GEN-BEGIN:|80-getter|2|
    }
//GEN-END:|80-getter|2|

    public TiledLayer getTankLayoutLayer() throws java.io.IOException {//GEN-BEGIN:|81-getter|0|81-preInit
        if (TankLayoutLayer == null) {//GEN-END:|81-getter|0|81-preInit
            // write pre-init user code here
            TankLayoutLayer = new TiledLayer(20, 20, getTanks_layout_sprites(), 21, 21);//GEN-BEGIN:|81-getter|1|81-midInit
            int[][] tiles = {
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0 },
                { 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
            };//GEN-END:|81-getter|1|81-midInit
            // write mid-init user code here
            for (int row = 0; row < 20; row++) {//GEN-BEGIN:|81-getter|2|81-postInit
                for (int col = 0; col < 20; col++) {
                    TankLayoutLayer.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|81-getter|2|81-postInit
        // write post-init user code here
        return TankLayoutLayer;//GEN-BEGIN:|81-getter|3|
    }
//GEN-END:|81-getter|3|

}
